package com.ruiyian.project.equipment.mapper;

import com.ruiyian.common.core.domain.entity.Equipment;

import java.util.List;

/**
 * @author chong
 * @email 673426164@qq.com
 * @create 2021/1/19
 * Desc:
 */
public interface EquipmentMapper {
    /**
     * 分页查询设备列表
     * @param equipment
     * @return
     */
    List<Equipment> selectEquiList(Equipment equipment);
    /**
     * 保存
     * @param equipment
     */
    void save(Equipment equipment);

    /**
     * 批量保存
     * @param list
     */
    void  batchSave(List<Equipment> list);

    /**
     * 编辑
     * @param equipment
     */
    void edit(Equipment equipment);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

    /**
     * 根据id获取对象
     * @param id
     * @return
     */
    Equipment findOne(Long id);

    /**
     * 批量删除
     * @param list
     */
    void deleteBatch(List<Equipment> list);

    /**
     * 根据 隧道id获取设备
      * @param equipment
     * @return
     */
    List<Equipment> selectEquiListByTunnelId(Equipment equipment);

    /**
     * 根据设备类型获取设备信息
     * @param equipment
     * @return
     */
    List<Equipment> selectEquiListByType(Equipment equipment);

    /**
     * 修改编号 code
     * @param equipment
     */
    void updateCode(Equipment equipment);

    void updatePoint(Equipment equipment);

    /**
     * 获取监控设备
     * @param tunnelId
     * @return
     */
    List<Equipment> selectVideoList(Long tunnelId);
}
